package o;

import android.util.LongSparseArray;
import java.lang.ref.WeakReference;

public class bkr {
    private final LongSparseArray<WeakReference> ˏ = new LongSparseArray();

    public long ॱ(long j, Object obj) {
        if (obj == null) {
            throw new NullPointerException("object must not be null.");
        }
        this.ˏ.put(j, new WeakReference(obj));
        return j;
    }

    public <T> T ˋ(long j) {
        WeakReference weakReference = (WeakReference) this.ˏ.get(j);
        if (weakReference == null) {
            return null;
        }
        try {
            return weakReference.get();
        } catch (ClassCastException e) {
            return null;
        }
    }

    public void ˏ(long j) {
        this.ˏ.remove(j);
    }
}
